(init_iterator): If noninteractive, and the frame's
authorGerd Moellmann <gerd@gnu.org>
Mon, 18 Dec 2000 12:02:13 +0000 (12:02 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 18 Dec 2000 12:02:13 +0000 (12:02 +0000)
face cache is null, make one.

src/xdisp.c

index 1a4493583c79cd813e9426c3e82a77cec911eb04..7fc606fed81db9dd93e0e78870e7596101a1a060 100644 (file)
@@ -1446,7 +1446,11 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id)
     }
 
   /* If realized faces have been removed, e.g. because of face
-     attribute changes of named faces, recompute them.  */
+     attribute changes of named faces, recompute them.  When running
+     in batch mode, the face cache of Vterminal_frame is null.  If
+     we happen to get called, make a dummy face cache.  */
+  if (noninteractive && FRAME_FACE_CACHE (it->f) == NULL)
+    init_frame_faces (it->f);
   if (FRAME_FACE_CACHE (it->f)->used == 0)
     recompute_basic_faces (it->f);